import request from '../../../utils/unirequest';
import type { AxiosResponse } from '../../../type/common';
import type { ISearchParams, IAddParams, ISearchResult } from './interface';
export default function useMenuApi() {
  return {
    // 查询已添加应用
    search: (data: ISearchParams): Promise<AxiosResponse<ISearchResult[]>> => request.post('/api/SysUserFavorite/Search', data),
    // 添加应用
    add: (data: IAddParams): Promise<AxiosResponse> => request.post('/api/SysUserFavorite/Add', data),
    // 删除应用
    delete: (data: string[]): Promise<AxiosResponse> => request.post('/api/SysUserFavorite/BatchDelete', data),
  }
}



